package com.shuqi.controller;

import android.content.Context;

import com.shuqi.interfaces.IEventListener;
import com.shuqi.model.BookSearchModel;

/**
 * 搜索控制器
 * 
 * @author linyuren
 * 
 */
public class BookSearchRecoomendController extends ControllerBase {

    private BookSearchModel model;

    public BookSearchRecoomendController(Context context) {
        this.model = new BookSearchModel(context);
    }

    @Override
    public void addEventListener(IEventListener listener) {
        model.addEventListener(listener);
    }

    @Override
    public void handle(int eventType, Object... obj) {
        switch (eventType) {
            case EVENT_LOADPAGE:
                model.loadData(obj);
                break;
            default:
                break;
        }
    }

    @Override
    public void onDestroy() {
        model.onDestroy();
    }
}
